package com.autumn.oauth2.zero.domain.entities;

import java.util.Date;

import javax.persistence.Column;

import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.StringTypeHandler;

import com.autumn.mybatis.mapper.annotation.ColumnOrder;
import com.autumn.mybatis.mapper.annotation.ColumnType;

/**
 * 用户登录日志
 * 
 * @author 老码农 2018-04-10 23:53:43
 */
public abstract class AbstractUserLoginLogger extends AbstractUserChild {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7999206610463270562L;

	@ColumnOrder(2)
	@Column(name = "login_time", length = 20, nullable = false)
	private Date loginTime;

	@ColumnOrder(3)
	@Column(name = "login_ip_address", length = 64, nullable = false)
	private String loginIpAddress;

	@ColumnOrder(4)
	@Column(name = "login_type", length = 20, nullable = false)
	private String loginType;

	@ColumnOrder(5)
	@Column(name = "client_type", length = 20, nullable = false)
	private String clientType;

	@ColumnOrder(6)
	@Column(name = "is_success", nullable = false)
	private boolean isSuccess;

	@ColumnOrder(7)
	@Column(name = "status_message", length = 255, nullable = false)
	private String statusMessage;

	@ColumnOrder(8)
	@Column(name = "client_info", nullable = false)
	@ColumnType(jdbcType = JdbcType.BLOB, typeHandlerClass = StringTypeHandler.class)
	private String clientInfo;

	public Date getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	public String getLoginIpAddress() {
		return loginIpAddress;
	}

	public void setLoginIpAddress(String loginIpAddress) {
		this.loginIpAddress = loginIpAddress;
	}

	public String getLoginType() {
		return loginType;
	}

	public void setLoginType(String loginType) {
		this.loginType = loginType;
	}

	public String getClientType() {
		return clientType;
	}

	public void setClientType(String clientType) {
		this.clientType = clientType;
	}

	public boolean isSuccess() {
		return isSuccess;
	}

	public void setSuccess(boolean isSuccess) {
		this.isSuccess = isSuccess;
	}

	public String getStatusMessage() {
		return statusMessage;
	}

	public void setStatusMessage(String statusMessage) {
		this.statusMessage = statusMessage;
	}

	public String getClientInfo() {
		return clientInfo;
	}

	public void setClientInfo(String clientInfo) {
		this.clientInfo = clientInfo;
	}

}
